<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="soBillDetail-table">
    <table id="soBillDetailGrid"></table>
</div>
<script>
    $(function () {
        var sbId=$('#sbId').val();
        console.log(sbId);
        var table=$('#soBillDetailGrid');
        table.datagrid({
            url:'api/bill/so/detail',
            method: 'get',
            queryParams:{soBillId:sbId},
            striped: true,
            fitColumns: true,
            singleSelect: true,
            pagination: true,
            pageSize: 15,
            pageList: [15,25,35,50,70],
            columns: [[
                { field: 'ref', title: '销售单号',  align: 'center'},
                { field: 'name', title: '商品名称', align: 'center' },
                { field: 'code', title: '商品编号', align: 'center' },
                { field: 'goodsCount', title: '销售数量',  align: 'center' },
                { field: 'goodsPrice', title: '销售单价', align: 'center'},
                { field: 'goodsMoney', title: '销售金额',  align: 'center'},
                { field: 'wsCount', title: '出库数量', align: 'center'},
                { field: 'leftCount', title: '未出库数量',  align: 'center'},
                { field: 'taxRate', title: '税率(%)',  align: 'center'},
                { field: 'tax', title: '税金',  align: 'center' },
                { field: 'moneyWithTax', title: '价税合计', align: 'center' },
                { field: 'memo', title: '备注', align: 'center' }

            ]],
            loadFilter: function (data) {
                if(data != null ){
                    return data.data;
                }
            }
        });
    });
</script>
